public class test4 {
    public static void main1(String[] args) {
        //StringBuilder s = new StringBuilder("abc");
        //System.out.println(s.reverse());
//        String s1 = "abc";
//        String s2 = "abc";
//        System.out.println(s1 == s2);
//        System.out.println(s1.equals(s2));
//
//        String s3 = new String("abc");
//        String s4 = new String("abc");
//        System.out.println(s3 == s4);
//        System.out.println(s3.equals(s4));
//
//        String s5 = "abc";
//        String s6 = "ac";
//        System.out.println(s5.compareTo(s6));

/*String s = "aaabbbcccaaabbbccc";
System.out.println(s.charAt(3));
System.out.println(s.indexOf('c'));
System.out.println(s.indexOf('c', 10));
System.out.println(s.indexOf("bbb"));
System.out.println(s.indexOf("bbb", 10));
System.out.println(s.lastIndexOf('c'));
System.out.println(s.lastIndexOf('c', 10));
System.out.println(s.lastIndexOf("bbb"));
System.out.println(s.lastIndexOf("bbb", 10));*/


        /*String s1 = String.valueOf(1234);
        String s2 = String.valueOf(12.34);
        String s3 = String.valueOf(true);
       // String s4 = String.valueOf(new Student("Hanmeimei", 18));
        System.out.println(s1);
        System.out.println(s2);
        //System.out.println(s4);
        System.out.println("=================================");*/


        /*String s = "hello";
// 字符串转数组
        char[] ch = s.toCharArray();
        for (int i = 0; i < ch.length; i++) {
        System.out.print(ch[i]);
        }
        System.out.println();
        // 数组转字符串
        String s2 = new String(ch);
        System.out.println(s2);*/

        /*String s1 = "hello world";
        String[] s2 = s1.split(" ");
        for (String s : s2) {
            System.out.println(s);
        }
        String s3 = "hello,i am wangtao,i like sing";
        String[] s4 = s3.split(",",2);
        for (String s : s4) {
            System.out.println(s);
        }*/

//        String s = new String("abc");
//
//        s="ab";
//        System.out.println(s);

//        StringBuilder s = new StringBuilder("abc");
//        s.append("efg");
//        System.out.println(s);
    }
}
